export const columns = context => {
  return [
    // {
    //   label: '部门名称',
    //   prop: 'name',
    //   width: 180
    // },
    {
      prop: 'departmentTypeName',
      label: '部门类型',
      minWidth: 120
    },
    {
      prop: 'number',
      label: '部门员工',
      minWidth: 120
    },
    {
      prop: 'updateTime',
      label: '更新时间',
      minWidth: 120
    },
    {
      prop: 'status',
      label: '部门状态',
      minWidth: 120,
      render: (h, row) => {
        return [
          <zm-switch
            value={row.status}
            active-value="1"
            inactive-value="2"
            onChange={() => context.onSwitch(row)}
          />
        ]
      }
    },
    {
      label: '操作',
      width: 160,
      render: (h, row) => {
        return [
          <a href="javascript:;" class="text-primary" onClick={() => context.onEdit(row)}>
            编辑
          </a>,
          <a href="javascript:;"
            class="text-error"
            v-show={row.id !== '1'}
            onClick={() => context.onDelete(row)}
          >
            删除
          </a>
        ]
      }
    }
  ]
}

export const departmentTypeList = [
  {
    name: '一级部门',
    value: '1'
  },
  {
    name: '二级部门',
    value: '2'
  }
]
